import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createWebHistory, createRouter } from 'vue-router'

import vue3videoPlay from "vue3-video-play"; // 引入组件
import "vue3-video-play/dist/style.css"; // 引入css


import IndexView from '@/views/Index.vue' // 首页
import ProductsView from '@/views/cp/Products.vue' // 产品
import zndljView from '@/views/cp/zndlj.vue' // 智能导览
import zzczgView from '@/views/cp/zzczg.vue' // 自助出租柜
import tdjjView from '@/views/cp/tdjj.vue' // 团队讲解
import yydljView from '@/views/cp/yydlj.vue' // 预约导览
import ledView from '@/views/cp/led.vue' // led屏
import headsetView from '@/views/cp/headset.vue' // 耳机
import nrzzView from '@/views/content/nrzz.vue' // 内容制作
import rjxtView from '@/views/rjxt/rjxt.vue' // 软件系统 
import sjfxView from '@/views/rjxt/sjfx.vue' // 数据分析
import ewmdlView from '@/views/rjxt/ewmdl.vue' // 二维码导览
import xcxdzView from '@/views/rjxt/xcxdz.vue' // 小程序定制
import dzzfxtView from '@/views/rjxt/dzzfxt.vue' // 电子支付系统
import xzzxView from '@/views/rjxt/xzzx.vue' // 下载中心
import newsView from '@/views/news/news.vue' // 新闻
import newsDetailView from '@/views/news/detail.vue' // 新闻详情
import fileDetailView from '@/views/news/filedetail.vue' // 文件详情
import gywmView from '@/views/gywm/gywm.vue' // 关于我们
import gsjsView from '@/views/gywm/gsjs.vue' // 公司介绍
import qqkhView from '@/views/gywm/qqkh.vue' // 全球客户
import contactUsView from '@/views/gywm/lxwm.vue' // 联系我们
import hzView from '@/views/hz/hz.vue' // 合作
import NotFound from '@/views/NotFound.vue' // 404

const routes = [
    { path: '/', component: IndexView },
    { path: '/sy', component: IndexView, name: 'sy' },
    // 产品
    { path: '/cp', component: ProductsView, name: 'cp' },
    { path: '/dyyjjxt', component: zndljView, name: 'dyyjjxt' },
    { path: '/czylxt', component: zzczgView, name: 'czylxt' },
    { path: '/dljzlxt', component: tdjjView, name: 'dljzlxt' },
    { path: '/zngjbzq', component: yydljView, name: 'zngjbzq' },
    { path: '/xsp', component: ledView, name: 'xsp' },
    { path: '/ej', component: headsetView, name: 'ej' },
    // 内容制作
    { path: '/nrzz', component: nrzzView, name: 'nrzz' },
    // 软件系统
    { path: '/rjxt', component: rjxtView, name: 'rjxt' },
    { path: '/sjfx', component: sjfxView, name: 'sjfx' },
    { path: '/ewmdl', component: ewmdlView, name: 'ewmdl' },
    { path: '/xcxdz', component: xcxdzView, name: 'xcxdz' },
    { path: '/dzzfxt', component: dzzfxtView, name: 'dzzfxt' },
    { path: '/xzzx', component: xzzxView, name: 'xzzx' },
    { path: '/xw', component: newsView, name: 'xw' },
    { path: '/news/detail/:id', component: newsDetailView, name: 'newsDetail' },
    { path: '/file/detail/:id', component: fileDetailView, name: 'fileDetail' },
    // 关于我们
    { path: '/gywm', component: gywmView, name: 'gywm' },
    { path: '/gsjs', component: gsjsView, name: 'gsjs' },
    { path: '/qqkh', component: qqkhView, name: 'qqkh' },
    { path: '/lxwm', component: contactUsView, name: 'lxwm' },
    // 合作
    { path: '/hz', component: hzView, name: 'hz' },
    { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound }
];

const router = createRouter({
    // hash模式
    // history: createWebHashHistory(),
    history: createWebHistory(),
    routes,
})

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(ElementPlus)
import 'virtual:windi.css'

app.use(router)
app.use(vue3videoPlay);
app.mount('#app')
